//系统管理模块路由

import System from '@/pages/system'

//用户管理模块
import SystemUser from '@/pages/system/user/'
import SystemUserList from '@/pages/system/user/list'
import SystemUserEidt from '@/pages/system/user/edit'
import SystemUserAdd from '@/pages/system/user/add'

//用户角色管理模块
import SystemRole from '@/pages/system/role/'
import SystemRoleList from '@/pages/system/role/list'
import SystemRoleAdd from '@/pages/system/role/add'
import SystemRoleEdit from '@/pages/system/role/edit'

//用户权限管理模块
import SystemScope from '@/pages/system/scope/'
import SystemScopeList from '@/pages/system/scope/list'
import SystemScopeEdit from '@/pages/system/scope/edit'

//前端路由理模块（只是一个开发阶段的功能 ， 上线后不需要的）
import SystemRoute from '@/pages/system/route/'
import SystemRouteList from '@/pages/system/route/list'
import SystemRouteAdd from '@/pages/system/route/add'
import SystemRouteEdit from '@/pages/system/route/edit'

const systemRoutes = {
  name: 'system',
  path: 'system',
  // meta:{//规定访问的权限账号
  //   requiresRole:[1],
  // },
  component: System,
  children:[
    {
      path: 'user',
      component:SystemUser,
      redirect:'user/list',
      children:[
        {
          path: 'list',
          component: SystemUserList
        },
        {
          path: 'edit/:uid',
          component: SystemUserEidt
        },
        {
          path: 'add',
          component: SystemUserAdd
        }
      ]
    },{
      path: 'role',
      component: SystemRole,
      redirect:'role/list',
      children:[
        {
          path: 'list',
          component:SystemRoleList
        }, {
          path: 'add',
          component:SystemRoleAdd
        }, {
          path: 'edit',
          component:SystemRoleEdit
        }
      ]
    },
    {
      path: 'scope',
      component: SystemScope,
      redirect:'scope/list',
      children:[
        {
          path: 'list',
          component:SystemScopeList
        }, {
          path: 'edit',
          component:SystemScopeEdit
        }
      ]
    },
    {
      path: 'route',
      component: SystemRoute,
      redirect:'route/list',
      children:[
        {
          path: 'list',
          component:SystemRouteList
        }, {
          path: 'edit',
          component:SystemRouteEdit
        }, {
          path: 'add',
          component:SystemRouteAdd
        }
      ]
    }
  ]
}

//导出
export default systemRoutes